﻿<%@ Page Title="" Language="C#" MasterPageFile="~/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="FinishedProducts.aspx.cs" Inherits="KCL.Report.FinishedProducts" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageHeader" runat="server">
    <script type="text/javascript" src="../styles/ui/jquery.ui.core.js"></script>   
    <script type="text/javascript" src="../styles/ui/jquery.ui.datepicker.js"></script>
	<script type="text/javascript" src="../styles/ui/i18n/jquery.ui.datepicker-vi.js"></script>
	<script type="text/javascript" src="../styles/js/jquery.PrintArea.js"></script>
	<link rel="stylesheet" type="text/css" href="../styles/themes/base/jquery.ui.all.css" />
	<script type="text/javascript">
	    $(document).ready(function () {
	        $(".datepicker").datepicker($.datepicker.regional['vi']);
	    });

	    function doPrint() {
	        $("#printArea").printArea();
	    }
	</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table>
        <tr>
            <td colspan="5">
                <span style="font-size: 25px; color: #474747">TỔNG SỐ THÀNH PHẨM</span>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Từ ngày&nbsp;&nbsp;
            </td>
            <td>
                <%--<asp:Calendar ID="dtFromDate" runat="server"></asp:Calendar>--%>
                <asp:TextBox ID="txtFromDate" runat="server" class="datepicker" ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;&nbsp;đến ngày&nbsp;&nbsp;
            </td>
            <td>
                <%--<asp:Calendar ID="dtToDate" runat="server"></asp:Calendar>--%>
                <asp:TextBox ID="txtToDate" runat="server" class="datepicker" ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" Text="Tìm" Width="120" 
                    onclick="btnSearch_Click" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <div>
        <asp:ObjectDataSource ID="dsFinishedProductReport" TypeName="KCL.Code.Data.Search"
            SortParameterName="sortExpression" SelectMethod="GetFinishedProducts" SelectCountMethod="GetTotalFinishedProducts"
            EnablePaging="True" runat="server" OnSelecting="dsFinishedProductReport_Selecting">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtFromDate" Name="txtFromDate" 
                    PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtToDate" Name="txtToDate" 
                    PropertyName="Text" Type="String" />
                <asp:Parameter Name="sortExpression" Type="String" />
                <asp:Parameter Name="maximumRows" Type="Int32" />
                <asp:Parameter Name="startRowIndex" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <div id="printArea">
            <asp:GridView ID="gridFinishedProductReport" AllowPaging="false" AllowSorting="True"
                AutoGenerateColumns="False" BackColor="Wheat" BorderColor="Firebrick" BorderStyle="Ridge"
                BorderWidth="1px" CellPadding="7" DataSourceID="dsFinishedProductReport" GridLines="None"
                Width="100%" runat="server" EnableModelValidation="True">
                <HeaderStyle BackColor="Black" ForeColor="Azure" Font-Bold="true" Wrap="false" />
                <FooterStyle ForeColor="Maroon" BackColor="DarkGoldenrod" />
                <PagerStyle ForeColor="Snow" HorizontalAlign="Right" BackColor="SaddleBrown" />
                <RowStyle BackColor="Ivory" />
                <Columns>
                    <asp:BoundField HeaderText="Số đơn hàng" DataField="code" SortExpression="code" />
                    <asp:BoundField HeaderText="Mã khách hàng" DataField="customerId" SortExpression="customerId" />
                    <asp:BoundField HeaderText="Mã nguyên liệu" DataField="materialId" SortExpression="materialId" />
                    <asp:BoundField HeaderText="Quy cách" DataField="description" SortExpression="description" />
                    <asp:BoundField HeaderText="Kích thước" DataField="size" SortExpression="size" />
                    <asp:BoundField HeaderText="Số lượng" DataField="orderQuantity" SortExpression="orderQuantity" />
                </Columns>
                <AlternatingRowStyle BackColor="SeaShell" />
            </asp:GridView>
            <i>Đang xem trang
                <%=gridFinishedProductReport.PageIndex + 1%>
                /
                <%=gridFinishedProductReport.PageCount %></i>
        </div>
    </div>
    <input id="btnPrint" type="button" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" onclick="doPrint()"/>
</asp:Content>